home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1993 November / JCSM Shareware Collection - 1993-11.iso / cl040 / cencallj.lzh / CENCALL.BAS next >
Encoding:
BASIC Source File  |  1992-05-15  |  2.5 KB  |  99 lines

  1. '05/14/92
  2. ' Makes A List Of Callers With Time And Date George M. Cheney 
  3. 'loads my personal quick basic library...just in case<grin>
  4. REM $INCLUDE: 'QBGMC.BI'
  5. DEFINT A-Z
  6. REDIM Text(1 TO 1000)
  7. 'Routine To Work New Display File If Erased
  8. ON ERROR GOTO NewFiIle
  9. OPEN "CENCALL.DAT" FOR INPUT SHARED AS #2
  10. CLOSE #2
  11.  
  12. DoItNow:
  13. 'Goes To Other Node If SFDOORS.ONE is not Found
  14. ON ERROR GOTO OtherNode 'routine to add multinode support...
  15. OPEN "SFDOORS.ONE" FOR INPUT AS #1
  16. TextLines = 0
  17. DO UNTIL EOF(1)
  18.     LINE INPUT #1, TextRow$
  19.     Handle = 0
  20.     FSSet Handle, TextRow$
  21.     TextLines = TextLines + 1
  22.     Text(TextLines) = Handle
  23. LOOP
  24. 'Data From Sfdoors.dat
  25. User$ = FSGet$(Text(2))  ' User Name
  26. Node$ = FSGet$(Text(24))  'Node Number
  27. Calling$ = "Called Node " + Node$
  28. CLOSE #1
  29. 'Now Need To Erase The File If It Is There
  30. KILL "SFDOORS.ONE"
  31. GOTO DoItAgain
  32.  
  33. OtherNode:
  34. RESUME CheckTwo
  35. CheckTwo:
  36. ON ERROR GOTO Finish
  37. OPEN "SFDOORS.TWO" FOR INPUT AS #1
  38. DO UNTIL EOF(1)
  39.     LINE INPUT #1, TextRow$
  40.     Handle = 0
  41.     FSSet Handle, TextRow$
  42.     TextLines = TextLines + 1
  43.     Text(TextLines) = Handle
  44. LOOP
  45. User$ = FSGet$(Text(2))  ' User Name
  46. Node$ = FSGet$(Text(24))  'Node Number
  47. Calling$ = "Called Node " + Node$
  48. CLOSE #1
  49. ' Now Need To Erase The File If It Exists..
  50. KILL "SFDOORS.TWO"
  51.  
  52. DoItAgain:
  53. 'Routine To Format To Standard Output 78 Chrs long
  54. 'Name First Set At 21 Characters
  55. Name$ = STR$(LEN(User$))
  56. Name1 = VAL(Name$)
  57. Callers = ABS(Name1 - 21)
  58. CallersName$ = User$ + SPACE$(Callers)
  59. 'User Name, Node And Time Called Goes Here In Display File
  60. OPEN "CENTIM.DAT" FOR INPUT SHARED AS #2
  61. LINE INPUT #2, When$
  62. CLOSE #2
  63. 'String To Put In Cencall.dat
  64. CallPrint$ = CallersName$ + "Called Node " + Node$ + " On " + When$ + " "
  65. 'Put It In CENCALL.DAT
  66. OPEN "Cencall.dat" FOR APPEND SHARED AS #3
  67. PRINT #3, CallPrint$
  68. CLOSE #3
  69. 'Display routine for local screen
  70. COLOR 15, 0
  71. CLS
  72. OPEN "Cencall.DAT" FOR INPUT SHARED AS #1
  73. DO
  74.     LINE INPUT #1, WhoCalled$
  75.     One$ = STR$(New)
  76.     One = VAL(One$)
  77.     OldNo$ = STR$(1)
  78.     Old = VAL(OldNo$)
  79.     New = ABS(Old + One)
  80.     News = ABS(New - Old)
  81.     PRINT WhoCalled$
  82.     LOOP UNTIL EOF(1)
  83. GOTO Finish
  84.  
  85. Finish:
  86. CLOSE #1
  87. PRINT "There Has Been " + STR$(News) + " Caller(s) On " + DATE$
  88. SLEEP (5)
  89. RESET
  90. END
  91.  
  92. NewFiIle:
  93. 'Routine To Put Header On Top Of THe File When Erased For New Day
  94. OPEN "Cencall.dat" FOR APPEND SHARED AS #4
  95. PRINT #4, "************************* BBS Callers On " + DATE$ + " *************************"
  96. CLOSE #4
  97. RESUME DoItNow
  98.  
  99.